// dlg.txt

begintalkscript;

variables;

begintalknode 1;
	state = -1;
	nextstate = -1;
	condition = get_sdf(23,1) == 0;
	question = "special";
	text1 = "The road here leads up into a pass to the south. This is one of very few passes over this mountain chain into the Storm Plains.";
	text2 = "It doesn't look like it is well-traveled. In fact, the ruts in the road are starting to be grown over. You don't see any evidence that anyone has passed through here for weeks.";
	text3 = "The road to the south is strewn with rubble and trash. And gnawed bones. You see no signs of who might have been ambushing travelers. They may have left. Or they may be hiding nearby.";
	action = SET_SDF 23 1 1;

begintalknode 2;
	state = -1;
	nextstate = -1;
	condition = get_sdf(23,2) == 0;
	question = "special";
	text1 = "This path is ominously quiet. Nobody has traveled back here for some time. The skulls in the grass look unpleasantly fresh.";
	text2 = "Considering the traps you have just passed, you suspect that someone is trying to warn you away from this route. As you round the corner, you see that it heads straight into the Mera Fen.";
	action = SET_SDF 23 2 1;

begintalknode 3;
	state = -1;
	nextstate = -1;
	condition = 1;
	question = "special";
	text1 = "The sound of clicking and hissing surrounds you. Clawbugs begin to erupt out of the piles of rubble all around you.";
	text2 = "This goes a small way toward explaining why nobody travels through this pass anymore.";

begintalknode 4;
	state = -1;
	nextstate = -1;
	condition = 1;
	question = "special";
	text1 = "__";

begintalknode 5;
	state = -1;
	nextstate = -1;
	condition = 1;
	question = "special";
	text1 = "Watson shouts, _Stop, intruder!_ He gives a command and his creations lunge at you. He follows.";

begintalknode 6;
	state = -1;
	nextstate = -1;
	condition = 1;
	question = "special";
	text1 = "There are several creations guarding this remote home. They seem ready to fight you to the death if you give them the slightest provocation.";


begintalknode 10;
	state = -1;
	nextstate = 10;
	condition = 1;
	question = "Name";
	text1 = "You smelled this little outpost well before you saw it. A miasma of foul smoke hangs over it, making your nose hurt and your eyes water. The leaves of the nearby trees are starting to brown around the edges.";
	text2 = "It's not just the stink that is keeping hostile rogues from approaching. There are also guards. Several large creations stand watch at the gate. There is also an armed man. He has a sword out and a pack hanging from his shoulder.";
	text3 = "He shouts, _Stop right there. I am Watson, and this brewery is on our land. You can't come in without permission._";
	text5 = "Watson stands ready, sword still out, in case you at any moment reveal yourself to be a brigand or killer. _We're watching you. I will trade with you, but, if you try to steal something, I've killed bandits before._";
	action = INTRO;

begintalknode 11;
	state = 10;
	nextstate = 11;
	condition = 1;
	question = "This is a brewery?";
	text1 = "Although he doesn't trust you, he decides to speak with you for a short time. He decides that it's the best way to get you to go peacefully.";
	text2 = "_It is a pod and spore works. My wife and I turn the herbs of the fen into spores for the Shapers and their army. It's dangerous being out here, but it's necessary._";
	code =
		if (gf(23,8) > 0)
			rs(1);
	break;
	
begintalknode 12;
	state = 11;
	nextstate = -1;
	condition = 1;
	question = "Why are you out here?";
	text1 = "He tries to laugh, but he ends up inhaling too much of the tainted air and coughing instead. _Doesn't your nose tell you? No town would have us._";

begintalknode 13;
	state = 11;
	nextstate = -1;
	condition = 1;
	question = "Who is your wife?";
	text1 = "_Sasa. She is the genius here. I harvest and prepare. She works the magic that actually makes the pods._";

begintalknode 14;
	state = 11;
	nextstate = 12;
	condition = 1;
	question = "Aren't you afraid of being attacked?";
	text1 = "_Of course. But we know how to defend ourselves. I've killed bandits before. It's not an empty boast. I buried them outside our gate._";
	text2 = "_The Shapers gave us some creations to keep us safe. The only thing we fear are the Unbound._";

begintalknode 15;
	state = 12;
	nextstate = -1;
	condition = 1;
	question = "Where are the Unbound?";
	text1 = "_In the fens, not far to the north. They are the thing we truly fear. However, they don't leave the swamp much anymore. I think we are safe from them now._";
	text2 = "_If we see one, though, we will run. No questions. No delay._";

begintalknode 16;
	state = 10;
	nextstate = 13;
	condition = 1;
	question = "You make pods? Can I buy some?";
	text1 = "He pats the pack at his side. _I keep a few pods with me when I watch the gate. I can trade some of the stock with travelers. Just not the best._";
	text2 = "_If you want to see the better pods, you need to enter and speak with Sasa._";
	code =
		if (gf(23,8) == 0)
			rs(2);
	break;

begintalknode 17;
	state = 13;
	nextstate = -1;
	condition = 1;
	question = "Let me see what you have.";
	text1 = "You conclude your business.";	
	code = 
		begin_shop_mode("Watson's Pods",
		  "Watson will sell you some of the weaker and more common pod and spore types.",
		  27,4,0);	
	break;
	
begintalknode 18;
	state = 13;
	nextstate = 10;
	condition = 1;
	question = "I'd like to discuss something else.";
	text1 = "_Yes?_";

begintalknode 19;
	state = 10;
	nextstate = -1;
	condition = 1;
	question = "Tell me about the pass to the south?";
	text1 = "_That is called Lerman's Pass. The Shapers have lost control of it. An Unbound managed to get up there, and they can't get the thing out. Lots of other rogues have gone up there since then._";
	text2 = "_I'd stay away from there. You can't possibly want to reach the Storm Plains that badly._";
	
begintalknode 20;
	state = 10;
	nextstate = 14;
	condition = gf(23,8) == 0 && gf(100,8) == 0;
	question = "Can I have permission to enter your home?";
	text1 = "Watson looks down at the fyora at his side and makes a clicking noise with his tongue. The creature walks up and sniffs at you. It makes an alarmed shrieking noise and runs back to Watson. Then it points a claw at your chest.";
	text2 = "The control tool shifts nervously in your chest, causing you some discomfort. Watson shakes his head. _There are some bad things out there now. You are afflicted with one of them. I can't let you near my wife._";

begintalknode 21;
	state = 10;
	nextstate = -1;
	condition = gf(23,8) == 0 && gf(100,8) > 0;
	question = "Can I have permission to enter your home?";
	text1 = "Watson looks down at the fyora at his side and makes a clicking noise with his tongue. The creature walks up and sniffs at you. Then it walks back to him.";
	text2 = "He steps aside. _You can come in. I think that Sasa will trade with you. We've heard enough stories about your travels._";
	action = END_TALK;
	code =
		sf(23,8,1);
	break;
	
begintalknode 22;
	state = 14;
	nextstate = -1;
	condition = 1;
	question = "You'd better let me in. You won't like the results if you don't.";
	text1 = "He points his sword at your chest. _I won't be intimidated by you, or by any such brigand. You want a fight? Step inside and you will get one._";
	text2 = "He watches you silently, ready to fight.";
	action = END_TALK;
	
begintalknode 23;
	state = 14;
	nextstate = -1;
	condition = gf(12,2) > 0 && get_stat(20) > 5;
	question = "I am working directly for Astoria. The thing that afflicts me will not harm you. You must let me in.";
	text1 = "Watson is painfully torn, but he believes your words. _I would not be accused of refusing shelter to a servant of the Councilor. I must take the chance._";
	text2 = "He steps aside. _You may see Sasa. Make one wrong step, and you will be buried with the other rogues._";
	action = END_TALK;
	code =
		sf(23,8,1);
	break;

begintalknode 24;
	state = 14;
	nextstate = -1;
	condition = 1;
	question = "All right. I'll be going then.";
	text1 = "Watson nods. _I sympathize. I don't envy you the ... illness you have. But I can't let you near Sasa the way you are. Good luck finding a cure._";
	text2 = "You walk away, muttering fresh curses at the control tool.";
	action = END_TALK;
	
begintalknode 25;
	state = 10;
	nextstate = -1;
	condition = gf(23,9) > 0;
	question = "I met Sasa.";
	text1 = "He nods. _Seems difficult, doesn't she? That is how she is around strangers, especially when she is nervous or busy. Don't be fooled, though. She's a good woman. And a loyal servant of the Shapers._";
		
//

begintalknode 30;
	state = -1;
	nextstate = 30;
	condition = 1;
	question = "Sasa";
	text1 = "This small workshop is run by a young enchantress. You have to make a loud noise to get her attention. She turns to you, but she seems odd, somehow. Her eyes don't meet yours. She seems very unhappy to have been disturbed.";
	text2 = "_I am Sasa. Since my husband let you in, I must have to deal with you. I will trade with you, as long as you let me get on with my work. Well?_";
	text3 = "She seems very strange and abrupt. Perhaps the heavy, foul fumes in here are affecting her.";
	text5 = "Sasa works on her pods and poultices. She chops herbs, mixes foul substances, and acts as if you aren't here. Perhaps she feels that, if she ignores you for long enough, you will disappear.";
	action = INTRO;
	code = 
		sf(23,9,1);
	break;
begintalknode 31;
	state = 30;
	nextstate = 31;
	condition = 1;
	question = "Don't the fumes bother you?";
	text1 = "_They have long since stopped being a bother._";

begintalknode 32;
	state = 31;
	nextstate = -1;
	condition = 1;
	question = "Why?";
	text1 = "_I can no longer smell. Or taste. I don't care for this chat. I have work to do. Are we trading or not?_";

begintalknode 33;
	state = 30;
	nextstate = -1;
	condition = 1;
	question = "Tell me about Watson.";
	text1 = "_He is my husband. I don't speak about my family with strangers. Come back when you are ready to trade._";
	text2 = "She turns away to deal with a bubbling pot of gray goop.";
	action = END_TALK;
	
begintalknode 34;
	state = 30;
	nextstate = -1;
	condition = 1;
	question = "I would like to buy some pods.";
	text1 = "You conclude your business.";	
	code = 
		begin_shop_mode("Sasa's Pods",
		  "Sasa will sell you some of the higher quality pods and spores she can make.",
		  28,5,0);	
	break;

begintalknode 35;
	state = 30;
	nextstate = -1;
	condition = 1;
	question = "Can you tell me about this area?";
	text1 = "_No._";

begintalknode 36;
	state = 30;
	nextstate = -1;
	condition = 1;
	question = "I will be going, then.";
	text1 = "Sasa nods silently and returns to work.";
	action = END_TALK;

	
//

begintalknode 50;
	state = -1;
	nextstate = 50;
	condition = 1;
	question = "Name";
	text1 = ".";
	text2 = "";
	text5 = ".";
	action = INTRO;

begintalknode 51;
	state = 50;
	nextstate = -1;
	condition = 1;
	question = "";
	text1 = ".";
	text2 = "";

	
begintalknode 52;
	state = 50;
	nextstate = -1;
	condition = 1;
	question = "";
	text1 = ".";
	text2 = "";
	
begintalknode 53;
	state = 50;
	nextstate = -1;
	condition = 1;
	question = "";
	text1 = ".";
	text2 = "";
	
begintalknode 54;
	state = 50;
	nextstate = -1;
	condition = 1;
	question = "";
	text1 = ".";
	text2 = "";
	
begintalknode 55;
	state = 50;
	nextstate = -1;
	condition = 1;
	question = "";
	text1 = ".";
	text2 = "";
	
begintalknode 56;
	state = 50;
	nextstate = -1;
	condition = 1;
	question = "";
	text1 = ".";
	text2 = "";
	
begintalknode 57;
	state = 50;
	nextstate = -1;
	condition = 1;
	question = "";
	text1 = ".";
	text2 = "";
	
begintalknode 58;
	state = 50;
	nextstate = -1;
	condition = 1;
	question = "";
	text1 = ".";
	text2 = "";

begintalknode 59;
	state = 50;
	nextstate = -1;
	condition = 1;
	question = "";
	text1 = ".";
	text2 = "";

begintalknode 60;
	state = 50;
	nextstate = -1;
	condition = 1;
	question = "";
	text1 = ".";
	text2 = "";

begintalknode 61;
	state = 50;
	nextstate = -1;
	condition = 1;
	question = "";
	text1 = ".";
	text2 = "";

begintalknode 62;
	state = 50;
	nextstate = -1;
	condition = 1;
	question = "";
	text1 = ".";
	text2 = "";

begintalknode 63;
	state = 50;
	nextstate = -1;
	condition = 1;
	question = "";
	text1 = ".";
	text2 = "";

begintalknode 64;
	state = 50;
	nextstate = -1;
	condition = 1;
	question = "";
	text1 = ".";
	text2 = "";

//

begintalknode 70;
	state = -1;
	nextstate = 70;
	condition = 1;
	question = "Name";
	text1 = ".";
	text2 = "";
	text5 = ".";
	action = INTRO;

begintalknode 71;
	state = 70;
	nextstate = -1;
	condition = 1;
	question = "";
	text1 = ".";
	text2 = "";

//

begintalknode 90;
	state = -1;
	nextstate = 90;
	condition = 1;
	question = "Name";
	text1 = ".";
	text2 = "";
	text5 = ".";
	action = INTRO;

begintalknode 91;
	state = 90;
	nextstate = -1;
	condition = 1;
	question = "";
	text1 = ".";
	text2 = "";
		